package org.serviceImpl;

import org.dao.UserDao;
import org.model.User;
import org.service.UserService;

/**
 * Created by tedzy on 2015/5/12.
 * User service 实现
 */
public class UserServiceImpl implements UserService {
    private UserDao userDao;

    public UserDao getUserDao() {
        return userDao;
    }

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    @Override
    public User checkLogin(String username, String password) {
        return userDao.checkLogin(username, password);
    }

    @Override
    public int countUsername(String username) {
        return userDao.countUsername(username);
    }

    @Override
    public boolean addUser(User user) {
        return userDao.addUser(user);
    }

    @Override
    public User getUser(int uid) {
        return userDao.getUser(uid);
    }

    @Override
    public void update(User user) {
        userDao.update(user);
    }
}
